﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Automobile.service.Model;
using Automobile.service.BLL;

namespace Automobile.service.UI
{
    public partial class BlitemShowMain : System.Web.UI.Page
    {
        BlitemBLL bll = new BlitemBLL();
        protected void Page_Load(object sender, EventArgs e)
        {  
            string Startime = this.logmin.Value;
            string Endtime = this.logmax.Value;
            if (!IsPostBack)
            {
              
                FenyeBlitem();
                Session["count"] = bll.Count(Startime, Endtime);

            }
        }
        public void FenyeBlitem()
        {
            string Startime = this.logmin.Value;
            string Endtime = this.logmax.Value;
            this.AspNetPager1.PageSize = 6;
            this.AspNetPager1.RecordCount = bll.Count(Startime,Endtime);
            this.Repeater1.DataSource = bll.ShowBlitem_Sel(this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, Startime, Endtime);
            this.Repeater1.DataBind();
            this.AspNetPager1.PageSize = 6;
        }

        

        protected void AspNetPager1_PageChanged1(object sender, EventArgs e)
        {
                FenyeBlitem();
        }

        protected void Unnamed_ServerClick(object sender, EventArgs e)
        {
            FenyeBlitem();
        }
    }
}